package svc

import (
	"user/api/internal/config"
	pb "user/pb"

	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config     config.Config
	UserClient pb.UserServiceClient
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:     c,
		UserClient: pb.NewUserServiceClient(zrpc.MustNewClient(c.UserRpc).Conn()),
	}
}
